package com.qifenqian.turbot.module.contract

import com.qifenqian.turbot.module.entity.response.StaffEntity
import com.qifenqian.turbot.net.ModelCallback

/**
 * @author H
 * @createTime 2018/12/27 11:19
 * @description
 * @see
 * @since
 */
interface StaffContract {

    interface Model {
        /**
         * 获取店员列表
         */
        fun getStaffList(callback: ModelCallback<List<StaffEntity>>)

        /**
         * 添加店员
         */
        fun addStaff(userName: String, userCode: String, callback: ModelCallback<Double>)

        /**
         * 编辑店员
         */
        fun editStaff(id: Int, userName: String, userCode: String, callback: ModelCallback<Nothing>)

        /**
         * 删除店员
         */
        fun deleteStaff(id: Int, callback: ModelCallback<Nothing>)
    }

    interface View {
        fun getStaffListResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, staffEntities: List<StaffEntity>? = null)

        fun addStaffResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, response: Double = -1.0)

        fun editStaffResult(isSuccess: Boolean, code: Int = 0, msg: String? = null)

        fun deleteStaffResult(isSuccess: Boolean, code: Int = 0, msg: String? = null)
    }

    interface Presenter {
        fun getStaffList()

        fun addStaff(userName: String, userCode: String)

        fun editStaff(id: Int, userName: String, userCode: String)

        fun deleteStaff(id: Int)
    }
}
